home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
commodore-users-of-norman
/
CUON_33_(10-1984).d64
/
bioprt 15x
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2019-04-13
|
4KB
|
158 lines
1 OPEN4,4
2 PRINT CHR$(147)
3 PRINT"THIS PROGRAM PLOTS YOUR BIORHYTHM CYCLES"
4 REM: REWRITTEN BY BILL BUCHANAN
5 REM: FOR COMMODORE 64
6 DIM F(12),T$(8),Z$(20),O$(55)
7 P=3.14159265
8 FOR I=1 TO 8:READ T$(I):NEXT
9 DATA "SUN","MON","TUE","WED","THU","FRI","SAT"," "
10 K=2*P
11 FOR I=1 TO 12:READ F(I):NEXT
12 DATA31,28,31,30,31,30,31,31,30,31,30,31
13 INPUT"BIORHYTHM FOR ";Z$
14 PRINT
15 PRINT"ENTER DATES IN THIS FORMAT MM,DD,YYYY"
16 PRINT
17 PRINT TAB(11);"BIRTHDATE:";
18 INPUT M1,D1,Y1
19 IF Y1>99 THEN 21
20 Y1=Y1+1900:PRINT Y1;" ASSUMED. ";
21 M2=M1:D2=D1:Y2=Y1
22 GOSUB 126
23 GOSUB 145: JB=JD
24 PRINT"JULIAN DATE ";JB
25 P1=P2
26 PRINT
27 PRINT TAB(10);"START DATE:";
28 INPUT M2,D2,Y2
29 IF Y2>99 THEN 31
30 Y2=Y2+1900:PRINT Y2;" ASSUMED. ";
31 GOSUB 126
32 GOSUB 145: JC=JD
33 PRINT"JULIAN DATE ";JC
34 AGE=JC-JB
35 PRINT
36 PRINT"NO. OF DAYS PRINTED:";
37 INPUT L
38 REM:
39 REM: PRINT CHART HEADING
40 REM:
41 GOSUB144
42 PRINT#4:PRINT#4
43 PRINT#4,CHR$(16)"12",CHR$(14)"BIORHYTHM PROGRAM"
44 PRINT#4,CHR$(15)
45 PRINT#4
46 GOSUB 144
47 PRINT#4," COMPLEMENTS OF BILL BUCHANAN [146]"
48 N=JC-JB
49 FOR I=1 TO 4:PRINT#4:NEXT
50 PRINT#4,"BIORHYTHM CHART FOR ";CHR$(27)CHR$(52)CHR$(14);Z$
51 PRINT#4,CHR$(27)CHR$(53)
52 PRINT#4,CHR$(16)"10BORN ON ";T$(P1);" ";M1;"/";D1;"/";Y1;" ";
53 PRINT#4,CHR$(9)"JULIAN DATE--";JB
54 PRINT#4,CHR$(16)"10BEGINNING ";T$(P2);" ";M2;"/";D2;"/";Y2;" ";
55 PRINT#4,CHR$(9)"JULIAN DATE--";JC
56 PRINT#4
57 PRINT#4,CHR$(16)"49AGE IN DAYS IS ";AGE
58 PRINT#4
59 PRINT#4,CHR$(16)"23P = PHYSICAL (23 DAYS)"
60 PRINT#4,CHR$(16)"23E = EMOTIONAL (28 DAYS)"
61 PRINT#4,CHR$(16)"23I = INTELLECTUAL (33 DAYS)"
62 PRINT#4,CHR$(16)"23* = INTERSECTION OF ANY TWO OF P, E, OR I"
63 PRINT#4,CHR$(16)"23A = OVER-ALL AVERAGE"
64 PRINT#4:PRINT#4
65 PRINT#4,CHR$(16)"21DOWN CRITICAL UP"
66 PRINT#4,CHR$(16)"21************************!*****!************************"
67 REM SET F(2) TO 29 FOR LEAP YEARS
68 X=Y2:GOSUB 137:F(2)=F(2)+X
69 REM GENERATE THE BIO PLOT
70 L=N+L:C=0:FOR N=N TO L-1:C=C+1:FOR X=1 TO 55:O$(X)="-":NEXT X
71 O$(25)="!":O$(31)="!":Y=0
72 XP=(SIN(K*(N/23-INT(N/23)))*27)+28+.5
73 XE=(SIN(K*(N/28-INT(N/28)))*27)+28+.5
74 XI=(SIN(K*(N/33-INT(N/33)))*27)+28+.5
75 O$(XP)="P"
76 O$(XE)="E"
77 O$(XI)="I"
78 IFINT(XI)=INT(XE) OR INT(XP)=INT(XE) THEN 81
79 IF INT(XP)=INT(XI) THEN 83
80 GOTO 84
81 O$(XE)="*"
82 GOTO 84
83 O$(XP)="*"
84 Y=(XP+XE+XI)/3
85 O$(Y)="A"
86 PRINT#4," ";T$(P2);SPC(3);M2;"/";D2;
87 PRINT#4,CHR$(9);" ";
88 FOR X=1 TO 55:PRINT#4,O$(X);:NEXT X:PRINT#4
89 REM:
90 REM: INCREMENT DATE
91 REM:
92 IF P2=8 THEN 95
93 P2=P2+1
94 IF P2>7 THEN P2=1
95 D2=D2+1
96 IF D2>F(M2) THEN D2=1:M2=M2+1
97 IF M2<13 THEN 99
98 M2=1:Y2=Y2+1
99 X=Y2:F(2)=28
100 GOSUB 137:F(2)=F(2)+X:NEXT N
101 PRINT#4:PRINT#4
102 PRINT#4," INSTRUCTIONS"
103 PRINT#4
104 PRINT#4," THE BIORHYTHM THEORY..."
105 PRINT#4:PRINT#4," POSTULATES THAT THERE ARE CERTAIN METABOLIC CYCLES,"
106 PRINT#4," WHICH HAVE A CONSTANT PERIOD IN THE HUMAN BODY."
107 PRINT#4:PRINT#4," THERE ARE THREE (3) CYCLES..."
108 PRINT#4," 23 DAY PHYSICAL"
109 PRINT#4," 28 DAY EMOTIONAL"
110 PRINT#4," 33 DAY INTELLECTUAL"
111 PRINT#4:PRINT#4," PHYSICAL IS ASSOCIATED WITH PHYSICAL VITALITY,"
112 PRINT#4," ENDURANCE AND ENERGY LEVEL."
113 PRINT#4:PRINT#4," EMOTIONAL CORRESPONDS TO SENSITIVITY,"
114 PRINT#4," INTUITION AND CHEERFULNESS."
115 PRINT#4:PRINT#4," INTELLECTUAL IS RELATED TO MENTAL ALERTNESS, "
116 PRINT#4," COGNITIVE POWER AND JUDGEMENT ABILITY.":PRINT#4
117 PRINT#4," ALL THREE CYCLES START AT ZERO AT THE MOMENT OF BIRTH."
118 PRINT:PRINT:INPUT"ANOTHER RUN?";V$
119 IF V$="Y" THEN 13
120 PRINT"THANK YOU...."
121 PRINT:PRINT:PRINT
122 PRINT"SEE YOU NEXT TIME."
123 CLOSE4
124 END
125 REM:
126 REM: FIND DAY OF WEEK
127 REM:
128 N1=M2+12*INT(.6+1/M2)
129 N2=Y2-INT(.6+1/M2)
130 N3=INT(13*(N1+1)/5)
131 N4=INT(5*N2/4)
132 N5=INT(N2/100)
133 N6=INT(N2/400)
134 N7=N3+N4-N5+N6+D2-1
135 P2=N7-7*INT(N7/7)+1
136 RETURN
137 REM CHECK X FOR LEAP YEAR
138 IFX/400-INT(X/400)=0THEN141
139 IFX/100-INT(X/100)=0THEN142
140 IFX/4-INT(X/4)<>0THEN142
141 X=1:RETURN
142 X=0:RETURN
143 RETURN
144 PRINT#4," ";:FORI=1TO72:PRINT#4,"*";:NEXTI:PRINT#4:RETURN
145 W=0:IF M2<3 THEN W= -1
146 JD=INT(1461*(Y2+4800+W)/4)
147 B=INT(367*(M2-W*12)/12)
148 IF B<0 THEN B=B+1
149 JD=JD+B
150 B=INT(INT(3*(Y2+4900+W)/100)/4)
151 JD=JD+D2-32136-B
152 RETURN
153 REM:
154 REM: ADAPTED FOR COMMODORE 64
155 REM: BILL BUCHANAN
156 REM: (405)-436-2639
157 REM: